package cn.wgx.modules.sys.entity;

import cn.wgx.modules.base.entity.BaseEntity;

import java.io.Serializable;
import java.util.Date;

/**
 * Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
 * Description:
 * 系统权限表
 *
 * @author
 */
public class SysPermission extends BaseEntity implements Serializable {

    /**
     * 排序
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private Integer sort;

    /**
     * 创建时间
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private Date createDate;

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private static final long serialVersionUID = 1L;

    /**
     * 父权限
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private String parent_key;

    /**
     * 权限值
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private String permissionKey;

    /**
     * 访问地址
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private String url;

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private Integer permission_id;

    /**
     * 方法
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private String method;

    /**
     * 所有父权限
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private String parent_keys;

    /**
     * 图标
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private String icon;

    /**
     * 是否是菜单
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private String menu_flag;

    /**
     * 更新人
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private Integer updateUserId;

    /**
     * 更新时间
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private Date updateDate;

    /**
     * 是否新建页面
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private String blank_flag;

    /**
     * 备注
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private String remark;

    /**
     * 权限名称
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private String permissionName;

    /**
     * 级别
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private Integer level;

    /**
     * 状态(1使用2不用)
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private String status;

    /**
     * 创建人
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private Integer createUserId;

    /**
     * 是否打开
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    private String open_flag;

    /**
     * This method returns the value of the database column cgcenter..sys_permission.parent_key
     *
     * @return the value of cgcenter..sys_permission.parent_key
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public String getParent_key() {
        return parent_key;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.blank_flag
     *
     * @param blank_flag the value for cgcenter..sys_permission.blank_flag
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setBlank_flag(String blank_flag) {
        this.blank_flag = blank_flag;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.permissionName
     *
     * @return the value of cgcenter..sys_permission.permissionName
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public String getPermissionName() {
        return permissionName;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withLevel(Integer level) {
        this.setLevel(level);
        return this;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.createDate
     *
     * @return the value of cgcenter..sys_permission.createDate
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.blank_flag
     *
     * @return the value of cgcenter..sys_permission.blank_flag
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public String getBlank_flag() {
        return blank_flag;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.parent_keys
     *
     * @param parent_keys the value for cgcenter..sys_permission.parent_keys
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setParent_keys(String parent_keys) {
        this.parent_keys = parent_keys;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.parent_keys
     *
     * @return the value of cgcenter..sys_permission.parent_keys
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public String getParent_keys() {
        return parent_keys;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.updateDate
     *
     * @param updateDate the value for cgcenter..sys_permission.updateDate
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withIcon(String icon) {
        this.setIcon(icon);
        return this;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withOpen_flag(String open_flag) {
        this.setOpen_flag(open_flag);
        return this;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.sort
     *
     * @param sort the value for cgcenter..sys_permission.sort
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setSort(Integer sort) {
        this.sort = sort;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.permission_id
     *
     * @param permission_id the value for cgcenter..sys_permission.permission_id
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setPermission_id(Integer permission_id) {
        this.permission_id = permission_id;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.level
     *
     * @return the value of cgcenter..sys_permission.level
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public Integer getLevel() {
        return level;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withPermissionName(String permissionName) {
        this.setPermissionName(permissionName);
        return this;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.updateUserId
     *
     * @param updateUserId the value for cgcenter..sys_permission.updateUserId
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setUpdateUserId(Integer updateUserId) {
        this.updateUserId = updateUserId;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.method
     *
     * @param method the value for cgcenter..sys_permission.method
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setMethod(String method) {
        this.method = method;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.sort
     *
     * @return the value of cgcenter..sys_permission.sort
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public Integer getSort() {
        return sort;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withMethod(String method) {
        this.setMethod(method);
        return this;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withUpdateDate(Date updateDate) {
        this.setUpdateDate(updateDate);
        return this;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.icon
     *
     * @return the value of cgcenter..sys_permission.icon
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public String getIcon() {
        return icon;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.open_flag
     *
     * @return the value of cgcenter..sys_permission.open_flag
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public String getOpen_flag() {
        return open_flag;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPermission_id() == null) ? 0 : getPermission_id().hashCode());
        result = prime * result + ((getPermissionKey() == null) ? 0 : getPermissionKey().hashCode());
        result = prime * result + ((getPermissionName() == null) ? 0 : getPermissionName().hashCode());
        result = prime * result + ((getParent_key() == null) ? 0 : getParent_key().hashCode());
        result = prime * result + ((getParent_keys() == null) ? 0 : getParent_keys().hashCode());
        result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
        result = prime * result + ((getMethod() == null) ? 0 : getMethod().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getIcon() == null) ? 0 : getIcon().hashCode());
        result = prime * result + ((getMenu_flag() == null) ? 0 : getMenu_flag().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getBlank_flag() == null) ? 0 : getBlank_flag().hashCode());
        result = prime * result + ((getOpen_flag() == null) ? 0 : getOpen_flag().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.menu_flag
     *
     * @param menu_flag the value for cgcenter..sys_permission.menu_flag
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setMenu_flag(String menu_flag) {
        this.menu_flag = menu_flag;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withUpdateUserId(Integer updateUserId) {
        this.setUpdateUserId(updateUserId);
        return this;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.url
     *
     * @param url the value for cgcenter..sys_permission.url
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withUrl(String url) {
        this.setUrl(url);
        return this;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withParent_key(String parent_key) {
        this.setParent_key(parent_key);
        return this;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.permissionKey
     *
     * @return the value of cgcenter..sys_permission.permissionKey
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public String getPermissionKey() {
        return permissionKey;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.createUserId
     *
     * @return the value of cgcenter..sys_permission.createUserId
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public Integer getCreateUserId() {
        return createUserId;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.parent_key
     *
     * @param parent_key the value for cgcenter..sys_permission.parent_key
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setParent_key(String parent_key) {
        this.parent_key = parent_key;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.permissionKey
     *
     * @param permissionKey the value for cgcenter..sys_permission.permissionKey
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setPermissionKey(String permissionKey) {
        this.permissionKey = permissionKey;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.permissionName
     *
     * @param permissionName the value for cgcenter..sys_permission.permissionName
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setPermissionName(String permissionName) {
        this.permissionName = permissionName;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.menu_flag
     *
     * @return the value of cgcenter..sys_permission.menu_flag
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public String getMenu_flag() {
        return menu_flag;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.icon
     *
     * @param icon the value for cgcenter..sys_permission.icon
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setIcon(String icon) {
        this.icon = icon;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withMenu_flag(String menu_flag) {
        this.setMenu_flag(menu_flag);
        return this;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.url
     *
     * @return the value of cgcenter..sys_permission.url
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public String getUrl() {
        return url;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.updateDate
     *
     * @return the value of cgcenter..sys_permission.updateDate
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public Date getUpdateDate() {
        return updateDate;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withSort(Integer sort) {
        this.setSort(sort);
        return this;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysPermission other = (SysPermission) that;
        return (this.getPermission_id() == null ? other.getPermission_id() == null : this.getPermission_id().equals(other.getPermission_id())) && (this.getPermissionKey() == null ? other.getPermissionKey() == null : this.getPermissionKey().equals(other.getPermissionKey())) && (this.getPermissionName() == null ? other.getPermissionName() == null : this.getPermissionName().equals(other.getPermissionName())) && (this.getParent_key() == null ? other.getParent_key() == null : this.getParent_key().equals(other.getParent_key())) && (this.getParent_keys() == null ? other.getParent_keys() == null : this.getParent_keys().equals(other.getParent_keys())) && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl())) && (this.getMethod() == null ? other.getMethod() == null : this.getMethod().equals(other.getMethod())) && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel())) && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort())) && (this.getIcon() == null ? other.getIcon() == null : this.getIcon().equals(other.getIcon())) && (this.getMenu_flag() == null ? other.getMenu_flag() == null : this.getMenu_flag().equals(other.getMenu_flag())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getBlank_flag() == null ? other.getBlank_flag() == null : this.getBlank_flag().equals(other.getBlank_flag())) && (this.getOpen_flag() == null ? other.getOpen_flag() == null : this.getOpen_flag().equals(other.getOpen_flag())) && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId())) && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate())) && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId())) && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate())) && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.updateUserId
     *
     * @return the value of cgcenter..sys_permission.updateUserId
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public Integer getUpdateUserId() {
        return updateUserId;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.remark
     *
     * @param remark the value for cgcenter..sys_permission.remark
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.createUserId
     *
     * @param createUserId the value for cgcenter..sys_permission.createUserId
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withPermissionKey(String permissionKey) {
        this.setPermissionKey(permissionKey);
        return this;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withRemark(String remark) {
        this.setRemark(remark);
        return this;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.permission_id
     *
     * @return the value of cgcenter..sys_permission.permission_id
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public Integer getPermission_id() {
        return permission_id;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.method
     *
     * @return the value of cgcenter..sys_permission.method
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public String getMethod() {
        return method;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", permission_id=").append(permission_id);
        sb.append(", permissionKey=").append(permissionKey);
        sb.append(", permissionName=").append(permissionName);
        sb.append(", parent_key=").append(parent_key);
        sb.append(", parent_keys=").append(parent_keys);
        sb.append(", url=").append(url);
        sb.append(", method=").append(method);
        sb.append(", level=").append(level);
        sb.append(", sort=").append(sort);
        sb.append(", icon=").append(icon);
        sb.append(", menu_flag=").append(menu_flag);
        sb.append(", status=").append(status);
        sb.append(", blank_flag=").append(blank_flag);
        sb.append(", open_flag=").append(open_flag);
        sb.append(", createUserId=").append(createUserId);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateUserId=").append(updateUserId);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", remark=").append(remark);
        sb.append("]");
        return sb.toString();
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.createDate
     *
     * @param createDate the value for cgcenter..sys_permission.createDate
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.status
     *
     * @param status the value for cgcenter..sys_permission.status
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withStatus(String status) {
        this.setStatus(status);
        return this;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.remark
     *
     * @return the value of cgcenter..sys_permission.remark
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public String getRemark() {
        return remark;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withCreateUserId(Integer createUserId) {
        this.setCreateUserId(createUserId);
        return this;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withPermission_id(Integer permission_id) {
        this.setPermission_id(permission_id);
        return this;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_permission.status
     *
     * @return the value of cgcenter..sys_permission.status
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public String getStatus() {
        return status;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.open_flag
     *
     * @param open_flag the value for cgcenter..sys_permission.open_flag
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setOpen_flag(String open_flag) {
        this.open_flag = open_flag;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withParent_keys(String parent_keys) {
        this.setParent_keys(parent_keys);
        return this;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withCreateDate(Date createDate) {
        this.setCreateDate(createDate);
        return this;
    }

    /**
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public SysPermission withBlank_flag(String blank_flag) {
        this.setBlank_flag(blank_flag);
        return this;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_permission.level
     *
     * @param level the value for cgcenter..sys_permission.level
     *
     * @mbg.generated Mon Jul 08 15:06:42 CST 2019
     */
    public void setLevel(Integer level) {
        this.level = level;
    }
}
